package main

import (
	"exam2.12/model"
	"exam2.12/server"
	"github.com/gin-gonic/gin"
)

func main() {
	o := server.ServerOrder{}
	g := server.ServerGoods{}
	r := gin.Default()
	model.Mysql_config()
	//新增订单
	r.POST("orderAdd", o.Add)
	//回滚订单
	r.POST("orderRollBack", o.OrderRollBack)
	//扣减库存
	r.POST("goods", g.Goods)
	//回滚库存
	r.POST("goodsRollBack", g.GoodsRollBack)
	r.Run("8088")
}
